home *** CD-ROM | disk | FTP | other *** search
INI File | 1987-09-20 | 2.9 KB | 104 lines |
- [lf][repeat][tab][4][[Locate] Demo
-
- The purpose of this file is to demonstrate the use of the "advanced" OECL
- features available in OECC version 1.02 and higher.
-
- First of all, the new [[locate] token will place the cursor into a position
- of your own choice. The word "locate" was taken from the BASIC language.
- The [[locate] token _MUST_ be followed by screen coordinates, showing first
- the row (line) then the column where you wish to position the cursor.
-
- The position must be expressed by a binary byte, not an ASCII representation
- thereof. Advanced OECL allows you to achieve the same by turning the
- coordinates into tokens (i.e. placing them into square brackets).
-
- Example:
-
- To move the cursor to the second column of the fifteenth line (row), you
- need to enter:
-
- [[locate][[15][[2]
-
- Please note that there may be no blanks between the tokens. But you may
- use blanks or even carriage returns INSIDE the token, e.g.,
-
- [[ locate ][[
-
- 15
-
- ][[
-
- 2 ]
-
- This is what happens if you compile it with OECC:
-
- [enter][cls][ locate ][
-
- 15
-
- ][
-
- 2 ]This should appear in the second column of the 15th line...
-
-
- Now let us see how to use [[ repeat ]:
-
- While OECC will automatically compress any sequence of four or more
- identical characters, you may achieve the same effect using the [[repeat]
- token. For example, to print out 15 equal signs (=), you can either
- type out 15 equal signs, or enter:
-
- [[repeat]=[[15]
-
- Again there may be no blanks between the tokens. Here is what you get:
-
- [repeat]=[15]
-
- To print out characters that do not appear on your keyboard, try something
- like this:
-
- [[repeat][[1][[15]
-
- This should give you 15 smiling faces:
-
- [repeat][1][15]
-
- IBM users can create fancy graphics screens with this command, but beware
- that your non-IBM callers will get junk....
-
- One word of warning!!! Do not use [[repeat] with [[26]. [[26] compiles
- to ^Z which makes the current version of Opus (1.03 as of this writing)
- think it came to the end of the file. If you really need to repeat a
- character 26 times, type it once, then repeat it 25 times. For example, this
- will give you 26 ='s:
-
- =[[repeat]=[[25]
-
- Like this:
-
- =[repeat]=[25]
-
- Using [[repeat] with [[lf] can be an efficient way of clearing the screen
- without using [[cls] which some non-ANSI systems may not understand. To see
- what I mean watch what happens if you enter:
-
- [[cr][[ repeat ][[ lf ][[ 30 ]
- [enter]
- [cr][ repeat ][ lf ][ 30 ]
-
- Did that clear your screen right?
-
- The rest of this demo is for IBM-ers only. Check out this code, think
- what it's going to give you, then hit ENTER to see the result.
-
- [[tab][[213][[repeat][[205][[30][[187][[cr][[lf][[tab][[179][[repeat] [[30][[186]
- [[tab][[192][[repeat][[196][[30][[189]
-
- [enter]
-
- OK. Here's the result:
-
- [tab][213][repeat][205][30][187][cr][lf][tab][179][repeat] [30][186]
- [tab][192][repeat][196][30][189]
-
-